//
//  ACAssetsPickerViewController.m
//  AlbumFetch
//
//  Created by 黄志明 on 2017/2/6.
//  Copyright © 2017年 黄志明. All rights reserved.
//

#import "ACAssetsPickerController.h"
#import "ACAssetsGridViewController.h"

@interface ACAssetsPickerController ()

@end

@implementation ACAssetsPickerController

- (instancetype)init
{
    return [self initWithMaxPhotoCount:9 delegate:nil];
}

- (instancetype)initWithMaxPhotoCount:(NSUInteger)maxPhotoCount delegate:(id<ACAssetsPickerControllerDelegate>)delegate
{
    ACAssetsGridViewController *assetGridViewController = [[ACAssetsGridViewController alloc] init];
    self = [super initWithRootViewController:assetGridViewController];
    
    if (self) {
        _maxPhotoPickCount = maxPhotoCount;
        _pickerDelegate = delegate;
        
        _allowPickPhoto = YES;
        _allowPickAudio = NO;
        _allowPickVideo = NO;
        
        _selectedAssetModels = [NSMutableArray array];
    }
    
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

// 公共方法，取消
- (void)cancelPickAssets
{
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
